<?php
/**
 * @file
 * ccloud_jn.features.inc
 */

/**
 * Implements hook_ctools_plugin_api().
 */
function ccloud_jn_ctools_plugin_api($module = NULL, $api = NULL) {
  if ($module == "page_manager" && $api == "pages_default") {
    return array("version" => "1");
  }
}

/**
 * Implements hook_views_api().
 */
function ccloud_jn_views_api($module = NULL, $api = NULL) {
  return array("api" => "3.0");
}

/**
 * Implements hook_node_info().
 */
function ccloud_jn_node_info() {
  $items = array(
    'basic_page' => array(
      'name' => t('网站信息'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'bus_info' => array(
      'name' => t('班车资讯'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'calendar' => array(
      'name' => t('校历'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'canteen_info' => array(
      'name' => t('食堂资讯'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'discovery' => array(
      'name' => t('发现'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'freshman_guide' => array(
      'name' => t('新生指引'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'lost_and_found' => array(
      'name' => t('失物招领'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'notice' => array(
      'name' => t('通知'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
    'place_info' => array(
      'name' => t('场地资讯'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('标题'),
      'help' => '',
    ),
  );
  drupal_alter('node_info', $items);
  return $items;
}

/**
 * Implements hook_default_wechat_response_message_type().
 */
function ccloud_jn_default_wechat_response_message_type() {
  $items = array();
  $items['ccloud_news'] = entity_import('wechat_response_message_type', '{
    "type" : "ccloud_news",
    "label" : "News (CCloud)",
    "weight" : "0",
    "data" : null,
    "rdf_mapping" : []
  }');
  $items['ccloud_reply'] = entity_import('wechat_response_message_type', '{
    "type" : "ccloud_reply",
    "label" : "Reply (CCloud)",
    "weight" : "0",
    "data" : null,
    "rdf_mapping" : []
  }');
  return $items;
}
